package cn.caplike.demo.repository.java.methodcall;

/**
 * Description: 入口类.
 *
 * @author LiKe
 * @version 1.0.0
 * @date 2021-06-05 13:31
 */
public class Application {

    /*
     * #调用顺序#
     * 1.RealmSecurityManager#setRealm -> afterRealmSet: A certainRealm
     * 2.AuthorizingSecurityManager#afterRealmSet -> super.afterRealmSet
     * 3.AuthenticatingSecurityManager#afterRealmSet -> super.afterRealmSet
     * 4.RealmSecurityManager#afterRealmSet: afterRealmSet
     * 5.AuthenticatingSecurityManager#afterRealmSet: afterRealmSet
     * 6.AuthorizingSecurityManager#afterRealmSet: afterRealmSet
     * -> 先执行子类的
     */

    public static void main(String[] args) {
        final DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
        defaultWebSecurityManager.setRealm("A certain Realm");
    }

}
